package com.example.blogback.vo;

import com.example.blogback.entity.Article;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "分类树形结构视图对象")
public class CategoryTreeVO {
    @Schema(description = "分类ID")
    private Long id;
    
    @Schema(description = "分类名称")
    private String name;
    
    @Schema(description = "分类描述")
    private String description;
    
    @Schema(description = "子分类列表")
    private List<SubCategoryVO> children;

    @Data
    @Schema(description = "子分类视图对象")
    public static class SubCategoryVO {
        @Schema(description = "子分类ID")
        private Long id;
        
        @Schema(description = "子分类名称")
        private String name;
        
        @Schema(description = "子分类描述")
        private String description;
        
        @Schema(description = "分类下的文章列表")
        private List<Article> articles;
    }
}